//
//  PCDApiLoginOut.m
//  PCDBankSix
//
//  Created by APPLE on 2023/8/17.
//

#import "PCDApiLoginOut.h"
#import "PCDLoginModel.h"
#import "PCDDataBaseModel.h"

@interface PCDApiLoginOut ()


@end

@implementation PCDApiLoginOut

- (void)handler:(id)data andContext:(PCDContext *)context ResponseCallback:(WVJBResponseCallback )responseCallback
{
      
    NSDictionary *dic = (NSDictionary *)data;
    NSString *callBack = [dic objectForKey:@"success"];
    NSString *failkcallBack = [dic objectForKey:@"fail"];
    UIViewController *bankWebViewController = context.viewController;

    //发退出登录接口
    [[PCDLoginModel shareInstance] loginOut:^(BOOL success, NSString * _Nonnull strMsg) {
        [PCDUtil saveLoginSession:nil];
        //清空内存缓存信息
        [[PCDDataBaseModel shareModel].memoryStorage removeAllObjects];
//        PCDBankWebViewController *view = context.viewController;
//        view.tabBarViewController.selectedIndex = 0;
//        [view.navigationController popToRootViewControllerAnimated:YES];
        evaluateJavaScriptOnMainThread_quotes(self, callBack, @"");
    }];
    
}


@end
